Note: The two-digit line numbers on the very left edge of the listing are for explanation purposes; they don't appear in the code.
注意:清单左端的两位数行号仅用于解释目的;它们不出现在代码中。
Putting this all together yields a flexible test class that verifies two scenarios: a sunny-day path and an edge case where no definition is provided, as shown in Listing 7.
结果产生一个灵活的文本类,它将检验两种场景:一种是良好的场景,而另一种是没有提供定义的边界用例,如清单7所示。
Listing 5 depends on certain behaviors for substring in some edge cases, as well as the conversion of Boolean values to Numbers.
清单5依赖于substring在某些边界情况下的行为以及布尔值到数字的转换。
应用推荐